<html>
<head><meta charset="utf-8"><title>optimizing-old-skool-rustc · t-compiler/wg-nll · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/index.html">t-compiler/wg-nll</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html">optimizing-old-skool-rustc</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="126749855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126749855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126749855">(May 18 2018 at 13:36)</a>:</h4>
<p>this is a placeholder thread to go on discussion why the location insensitive rustc is still taking too long to compile clap; see older notes in the making-more-plans thread</p>



<a name="126754659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754659">(May 18 2018 at 15:16)</a>:</h4>
<p>ok I spent some time looking at why the type check is so expensive</p>



<a name="126754661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754661">(May 18 2018 at 15:16)</a>:</h4>
<p>I think I have a fix</p>



<a name="126754683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754683">(May 18 2018 at 15:17)</a>:</h4>
<p>in particular the <em>vast</em> majority of that time seems to be allocating some vectors we don't have to be allocating</p>



<a name="126754685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754685">(May 18 2018 at 15:17)</a>:</h4>
<p>but I'll have to tweak the ena API</p>



<a name="126754690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754690">(May 18 2018 at 15:17)</a>:</h4>
<p>should be easy though</p>



<a name="126754749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754749">(May 18 2018 at 15:18)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> or <span class="user-mention" data-user-id="116110">@Chris Vittal</span> — either of you, feel free to ping me if you want to help out with other optimization efforts on rustc (as opposed to <a href="https://github.com/rust-lang-nursery/polonius/" target="_blank" title="https://github.com/rust-lang-nursery/polonius/">polonius</a> hacking)</p>



<a name="126754751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754751">(May 18 2018 at 15:18)</a>:</h4>
<p>(or anybody :)</p>



<a name="126754772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754772">(May 18 2018 at 15:18)</a>:</h4>
<p>I'm more than happy to work on that if that's where the work is needed.</p>



<a name="126754860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754860">(May 18 2018 at 15:20)</a>:</h4>
<p>ok I'm about to step out but I think that a good thing to do would be to look into how we can make <code>kill_loans_out_of_scope_at_location</code> faster</p>



<a name="126754864"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754864" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754864">(May 18 2018 at 15:20)</a>:</h4>
<p>right now, it is very simplistic:</p>



<a name="126754868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754868">(May 18 2018 at 15:20)</a>:</h4>
<p>it iterates over <em>all borrows</em> and checks whether they are out of scope at a given location</p>



<a name="126754869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754869">(May 18 2018 at 15:20)</a>:</h4>
<p>this is pretty dumb</p>



<a name="126754874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754874">(May 18 2018 at 15:21)</a>:</h4>
<p>I'm not 100% sure what would be better ;) but I can think of at least some things</p>



<a name="126754891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754891">(May 18 2018 at 15:21)</a>:</h4>
<p>e.g., for each borrow, we could compute the set of <strong>transition points</strong> Q where:</p>
<ul>
<li>there is some predecessor P where the borrow <em>is</em> live</li>
<li>the borrow is <em>not</em> live at Q</li>
</ul>



<a name="126754939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754939">(May 18 2018 at 15:22)</a>:</h4>
<p>if we kept an index like <code>Q -&gt; [L]</code> where <code>Q</code> is some point and <code>[L]</code> is the set of borrows (loans) that have a transition point <code>Q</code>,</p>



<a name="126754942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754942">(May 18 2018 at 15:22)</a>:</h4>
<p>then <code>kill_loans_out_of_scope_at_location</code> could just lookup in that set</p>



<a name="126754946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126754946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126754946">(May 18 2018 at 15:22)</a>:</h4>
<p>I'll be back in a few minutes, gotta walk to the subway</p>



<a name="126755948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126755948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126755948">(May 18 2018 at 15:47)</a>:</h4>
<p>ok on subway now :)</p>



<a name="126755956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126755956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126755956">(May 18 2018 at 15:47)</a>:</h4>
<p>I'm not sure if what I just proposed <em>really</em> makes sense</p>



<a name="126755957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126755957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126755957">(May 18 2018 at 15:47)</a>:</h4>
<p>it's not obvious to me how to build said map</p>



<a name="126755962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126755962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126755962">(May 18 2018 at 15:47)</a>:</h4>
<p>but it feels like there has to be a faster way to do what we are doing</p>



<a name="126755971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126755971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126755971">(May 18 2018 at 15:47)</a>:</h4>
<p>it occurs to me that if we <em>did</em> migrate to SEME regions (current system is not using them) they might enable a faster way to detect these transition points</p>



<a name="126759190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126759190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Vittal <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126759190">(May 18 2018 at 17:02)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  I'm fine with either polonius hacking, or rustc hacking. What's there to do?</p>



<a name="126759214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126759214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126759214">(May 18 2018 at 17:03)</a>:</h4>
<p>well so <span class="user-mention" data-user-id="116083">@pnkfelix</span> and I were talking earlier. The TL;DR is that we should try to polish rustc "as is" but keep things moving with polonius. That way we can integrate at our leisure.</p>



<a name="126759219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126759219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126759219">(May 18 2018 at 17:03)</a>:</h4>
<p>as far as rustc goes, there are two bottlenecks:</p>



<a name="126759221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126759221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126759221">(May 18 2018 at 17:03)</a>:</h4>
<p>one of them I had planned to tackle right now</p>



<a name="126759269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126759269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126759269">(May 18 2018 at 17:04)</a>:</h4>
<p>though I would be happy to mentor it out also :) it involves adding a feature to <a href="https://github.com/rust-lang-nursery/ena" target="_blank" title="https://github.com/rust-lang-nursery/ena">ena</a></p>



<a name="126759274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126759274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126759274">(May 18 2018 at 17:04)</a>:</h4>
<p>I'm kind of incline dto just do it though</p>



<a name="126759277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126759277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126759277">(May 18 2018 at 17:04)</a>:</h4>
<p>since it will take me as long to describe as to do =)</p>



<a name="126759280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126759280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126759280">(May 18 2018 at 17:04)</a>:</h4>
<p>and I'd like to see how much faster it will go</p>



<a name="126759295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126759295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126759295">(May 18 2018 at 17:04)</a>:</h4>
<p>the other is the <code>kill_loans_out_of_scope_at_location</code> thing I was talking about above; I'm not sure the best plan there</p>



<a name="126759320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126759320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126759320">(May 18 2018 at 17:05)</a>:</h4>
<p>oh heh that's sort of funny</p>



<a name="126759364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126759364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126759364">(May 18 2018 at 17:06)</a>:</h4>
<p>looking in my local clone of <code>ena</code> I see I had already started the changes I had in mind</p>



<a name="126759367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126759367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126759367">(May 18 2018 at 17:06)</a>:</h4>
<p>and just forgotten about it</p>



<a name="126764820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126764820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126764820">(May 18 2018 at 19:13)</a>:</h4>
<hr>



<a name="126764860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126764860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126764860">(May 18 2018 at 19:14)</a>:</h4>
<p>ok so on the topic of <code>kill_loans_out_of_scope_at_location</code></p>



<a name="126764862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126764862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126764862">(May 18 2018 at 19:14)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> and I did a quick chat to cover background, which I will post, but it remains not <em>entirely</em> obvious to me how to do this better</p>



<a name="126764864"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126764864" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126764864">(May 18 2018 at 19:14)</a>:</h4>
<p>at least one thing <span class="user-mention" data-user-id="116107">@David Wood</span> that came up is that we should try just calling it less often</p>



<a name="126764869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126764869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126764869">(May 18 2018 at 19:14)</a>:</h4>
<p>(not entirely sure that I came up with it, but sure)</p>



<a name="126764878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126764878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126764878">(May 18 2018 at 19:15)</a>:</h4>
<p>well it came up anyway :)</p>



<a name="126764880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126764880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126764880">(May 18 2018 at 19:15)</a>:</h4>
<p>want to give that a shot and see what breaks?</p>



<a name="126764886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126764886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126764886">(May 18 2018 at 19:15)</a>:</h4>
<p>I suspect we only need the calls from <code>before_{statement,terminator}_effect</code></p>



<a name="126764888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126764888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126764888">(May 18 2018 at 19:15)</a>:</h4>
<p>Sure thing.</p>



<a name="126764892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126764892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126764892">(May 18 2018 at 19:15)</a>:</h4>
<p>I can't yet see how it could be otherwise..</p>



<a name="126789832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126789832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126789832">(May 19 2018 at 09:21)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> two things.</p>
<p>1. we should open a rustc issue. I'll do that, and then leave some more detailed notes.<br>
2. I was thinking about this later and I think probably the best we can do to compute the kills for each borrow is like this:</p>
<ul>
<li>iterate over list of borrows </li>
<li>for each borrow, we would do a DFS starting from the point of the borrow, stopping as we exit the region of the borrow: each point where we stop, we add a kill</li>
</ul>
<p>This is not how the current dataflow framework is setup, though: it wants to walk and, at each point, ask you: should I have a gen/kill bit here?</p>
<p>I <em>think</em> there are other APIs though we could use for this, but if not, we could do that walk and build up a datastructure to use later (basically a map <code>P -&gt; Vec&lt;L&gt;</code> of killed borrows)</p>



<a name="126789874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126789874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126789874">(May 19 2018 at 09:22)</a>:</h4>
<p>I suspect this will be a big win even in "theoretically" it doesn't feel <em>that</em> much better</p>



<a name="126789917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126789917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126789917">(May 19 2018 at 09:24)</a>:</h4>
<p>Alright, great. (I've still been running into some issues getting rustc to compile - not sure what's changed in my setup or in rustc since I last compiled it, but after I've got that sorted I'll be looking at this).</p>



<a name="126796555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126796555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126796555">(May 19 2018 at 13:47)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I'm not seeing any errors on run-pass or compile-fail after calling from only <code>before_{statement, terminator}_effect</code>.</p>



<a name="126796701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126796701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126796701">(May 19 2018 at 13:52)</a>:</h4>
<p>maybe open a PR then :) r? me or pnkfelix...</p>



<a name="126797793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126797793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126797793">(May 19 2018 at 14:37)</a>:</h4>
<p>Sure thing.</p>



<a name="126797886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126797886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126797886">(May 19 2018 at 14:41)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/50891" target="_blank" title="https://github.com/rust-lang/rust/pull/50891">https://github.com/rust-lang/rust/pull/50891</a></p>



<a name="126829723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126829723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126829723">(May 20 2018 at 11:55)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> did you open an issue for this?</p>



<a name="126870633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126870633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126870633">(May 21 2018 at 12:46)</a>:</h4>
<p>no sorry I should do that</p>



<a name="126870638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126870638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126870638">(May 21 2018 at 12:46)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> which is your PR btw ?</p>



<a name="126870710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126870710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126870710">(May 21 2018 at 12:48)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/50891" target="_blank" title="https://github.com/rust-lang/rust/pull/50891">https://github.com/rust-lang/rust/pull/50891</a></p>



<a name="126871038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871038">(May 21 2018 at 12:56)</a>:</h4>
<p>ok <span class="user-mention" data-user-id="116107">@David Wood</span> filed <a href="https://github.com/rust-lang/rust/issues/50934" target="_blank" title="https://github.com/rust-lang/rust/issues/50934">https://github.com/rust-lang/rust/issues/50934</a></p>



<a name="126871059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871059">(May 21 2018 at 12:57)</a>:</h4>
<p>thanks <span class="user-mention" data-user-id="116107">@David Wood</span> , I r+'ed rust-lang/rust#50891 in the meantime</p>



<a name="126871065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871065">(May 21 2018 at 12:57)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> silly question, but does the MIR dataflow code have the option of adding a kill bit to an arbitrary point P?</p>



<a name="126871101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871101">(May 21 2018 at 12:58)</a>:</h4>
<p>right now, it usually does some kind of walk and invokes <code>statement_effect</code> to learn this information</p>



<a name="126871108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871108">(May 21 2018 at 12:58)</a>:</h4>
<p>Thanks. I'll take a look into that issue a little later today.</p>



<a name="126871114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871114">(May 21 2018 at 12:58)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> right, we only keep per-block info globally</p>



<a name="126871117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871117">(May 21 2018 at 12:58)</a>:</h4>
<p>anyway maybe add some notes about that to #50934</p>



<a name="126871121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871121">(May 21 2018 at 12:58)</a>:</h4>
<p>hmm ok right</p>



<a name="126871123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871123">(May 21 2018 at 12:58)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> and rely on the client to reconstruct any intra-block effect</p>



<a name="126871124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871124">(May 21 2018 at 12:58)</a>:</h4>
<p>well ok</p>



<a name="126871125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871125">(May 21 2018 at 12:58)</a>:</h4>
<p>I guess all that means is</p>



<a name="126871128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871128">(May 21 2018 at 12:58)</a>:</h4>
<p>we should — in the <code>BorrowSet</code> or some such place — build up an index</p>



<a name="126871131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871131">(May 21 2018 at 12:59)</a>:</h4>
<p>that we can consult in the <code>Borrows</code> iterator</p>



<a name="126871155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871155">(May 21 2018 at 12:59)</a>:</h4>
<p>an index of what? Is this something for rust-lang/rust#50934 ?</p>



<a name="126871211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871211">(May 21 2018 at 13:00)</a>:</h4>
<p>yes</p>



<a name="126871213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871213">(May 21 2018 at 13:00)</a>:</h4>
<p>right now, to figure out which loans go out of scope at some location L,</p>



<a name="126871217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871217">(May 21 2018 at 13:00)</a>:</h4>
<p>we iterate over all loans</p>



<a name="126871222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871222">(May 21 2018 at 13:00)</a>:</h4>
<p>and check if L is in their region</p>



<a name="126871230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871230">(May 21 2018 at 13:00)</a>:</h4>
<p>the best improvement I can think of (maybe you can think of a better one!) is to instead do a DFS starting from the point of each borrow</p>



<a name="126871258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871258">(May 21 2018 at 13:01)</a>:</h4>
<p>and then keep a map <code>Location -&gt; Set&lt;BorrowIndex&gt;</code></p>



<a name="126871266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871266">(May 21 2018 at 13:01)</a>:</h4>
<p>which basically stores the locations where each borrow went out of scope</p>



<a name="126871268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871268">(May 21 2018 at 13:01)</a>:</h4>
<p>this is still O(N^2) but you are only walking over the points actually <em>in</em> each borrow</p>



<a name="126871330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871330">(May 21 2018 at 13:03)</a>:</h4>
<p>anyway, <span class="user-mention" data-user-id="116107">@David Wood</span> , <a href="https://github.com/rust-lang/rust/issues/50934#issuecomment-390647460" target="_blank" title="https://github.com/rust-lang/rust/issues/50934#issuecomment-390647460">left more notes here</a></p>



<a name="126871345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871345">(May 21 2018 at 13:03)</a>:</h4>
<p>Great, thanks.</p>



<a name="126871399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871399">(May 21 2018 at 13:04)</a>:</h4>
<p>btw over the weekend my <a href="https://github.com/rust-lang/rust/pull/50874" target="_blank" title="https://github.com/rust-lang/rust/pull/50874">PR #50874</a> landed which seems to have been a <a href="http://perf.rust-lang.org/compare.html?start=bdace29de04af4fe9e4317b73c3f7d6418a33de1&amp;end=c95e1cccc9c248789230a54ecfd87971a04d5c0c&amp;stat=instructions:u" target="_blank" title="http://perf.rust-lang.org/compare.html?start=bdace29de04af4fe9e4317b73c3f7d6418a33de1&amp;end=c95e1cccc9c248789230a54ecfd87971a04d5c0c&amp;stat=instructions:u">10-20% win overall</a> — I'm looking to see what's the next bottle neck in the typeck</p>



<a name="126871400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126871400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126871400">(May 21 2018 at 13:04)</a>:</h4>
<p>I think it's still in that general area</p>



<a name="126925068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925068">(May 22 2018 at 14:13)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> speaking of topic hygiene, jfyi we can discuss how to improve <code>kill_loans_out_of_scope_at_location</code> here I suppose =)</p>



<a name="126925080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925080">(May 22 2018 at 14:13)</a>:</h4>
<p>ah true</p>



<a name="126925147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925147">(May 22 2018 at 14:14)</a>:</h4>
<p>okay I've re-read <a href="https://github.com/rust-lang/rust/issues/50934" target="_blank" title="https://github.com/rust-lang/rust/issues/50934">https://github.com/rust-lang/rust/issues/50934</a> ; it basically amounts to trying to precompute the kill-set on the Borrows for each location</p>



<a name="126925155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925155">(May 22 2018 at 14:14)</a>:</h4>
<p>(IIUC)</p>



<a name="126925165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925165">(May 22 2018 at 14:14)</a>:</h4>
<p>yeah nothing too clever</p>



<a name="126925168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925168">(May 22 2018 at 14:14)</a>:</h4>
<p>I'm just banking it would be faster</p>



<a name="126925170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925170">(May 22 2018 at 14:15)</a>:</h4>
<p>tbh I didn't quite understand what you were proposing</p>



<a name="126925179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925179">(May 22 2018 at 14:15)</a>:</h4>
<p>but maybe I have to (re-)read the source first</p>



<a name="126925309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925309">(May 22 2018 at 14:17)</a>:</h4>
<p>well I think I didn't understand everything here at first</p>



<a name="126925430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925430">(May 22 2018 at 14:20)</a>:</h4>
<p>(namely I misread the code and thought we were iterating over a bitset in the outer loop. But we're actually iterating, as you have said repeatedly, <em>all</em> of the registered borrows.)</p>



<a name="126925507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925507">(May 22 2018 at 14:20)</a>:</h4>
<p>you know: While we need to do the full iteration when we are setting up the initial gen and kill sets</p>



<a name="126925510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925510">(May 22 2018 at 14:21)</a>:</h4>
<p>once the dataflow equations are solved</p>



<a name="126925522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925522">(May 22 2018 at 14:21)</a>:</h4>
<p>we should be able to just iterate over the bits set to 1 in the block sets, right?</p>



<a name="126925529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925529">(May 22 2018 at 14:21)</a>:</h4>
<p>/me goes to double-check if we actually call these methods after the dataflow has been run</p>



<a name="126925577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925577">(May 22 2018 at 14:22)</a>:</h4>
<blockquote>
<p>we should be able to just iterate over the bits set to 1 in the block sets, right?</p>
</blockquote>
<p>yes, this was something else I wanted to consider doing</p>



<a name="126925584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925584">(May 22 2018 at 14:22)</a>:</h4>
<p>but then I was thinking that — if we pre-compute the sets we need — it hardly matters anyway, right?</p>



<a name="126925625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925625">(May 22 2018 at 14:23)</a>:</h4>
<p>it does matter</p>



<a name="126925634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925634">(May 22 2018 at 14:23)</a>:</h4>
<p>because when we do the post-processing after dataflow has been solved</p>



<a name="126925650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925650">(May 22 2018 at 14:23)</a>:</h4>
<p>we are calling reconstruct_statement_effect</p>



<a name="126925707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925707">(May 22 2018 at 14:24)</a>:</h4>
<p>which, right now, calls into the code like <code>before_statement_effect</code></p>



<a name="126925712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925712">(May 22 2018 at 14:24)</a>:</h4>
<p>yes, I know, but the set of borrows killed at that point are almost certainly the same set that are gen'd</p>



<a name="126925717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925717">(May 22 2018 at 14:24)</a>:</h4>
<p>unless you have a case like <code>foo = ...</code> which kills the borrow</p>



<a name="126925719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925719">(May 22 2018 at 14:24)</a>:</h4>
<p>my point is that we are still iterating over the full index</p>



<a name="126925720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925720">(May 22 2018 at 14:24)</a>:</h4>
<p>in the outer loop</p>



<a name="126925728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925728">(May 22 2018 at 14:24)</a>:</h4>
<p>or do you think that isn't a problem?</p>



<a name="126925749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925749">(May 22 2018 at 14:25)</a>:</h4>
<p>to be clear, I am saying:</p>
<p>1. iterating only over the live borrows (in second phase) would be a win<br>
but<br>
2. if we had a <code>Point -&gt; Vec&lt;Location&gt;</code> map (which we need anyway, probably?) then this might subsume that</p>



<a name="126925757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925757">(May 22 2018 at 14:25)</a>:</h4>
<p>but I agree that it would be a win</p>



<a name="126925818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925818">(May 22 2018 at 14:26)</a>:</h4>
<p>sorry, is the <code>Point -&gt; Vec&lt;Location&gt;</code> map ... is that the same as the side-index you propose in <a href="https://github.com/rust-lang/rust/issues/50934" target="_blank" title="https://github.com/rust-lang/rust/issues/50934">https://github.com/rust-lang/rust/issues/50934</a> ?</p>



<a name="126925824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925824">(May 22 2018 at 14:26)</a>:</h4>
<p>yes, that one</p>



<a name="126925828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925828">(May 22 2018 at 14:26)</a>:</h4>
<p>I guess we don't "have to do it"</p>



<a name="126925831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925831">(May 22 2018 at 14:26)</a>:</h4>
<p>I am personally worried that any such table will be a space hog</p>



<a name="126925832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925832">(May 22 2018 at 14:26)</a>:</h4>
<p>just that, <em>if we do it</em>, it might subsume the other computation</p>



<a name="126925845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925845">(May 22 2018 at 14:27)</a>:</h4>
<p>hmm, I'd be surprised by that</p>



<a name="126925855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925855">(May 22 2018 at 14:27)</a>:</h4>
<p>keep in mind that this table would hvae far fewer kills than we currently create</p>



<a name="126925856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925856">(May 22 2018 at 14:27)</a>:</h4>
<p>while the idea of "iterating over the live borrows" should be implementable with the state we are computing today</p>



<a name="126925858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925858">(May 22 2018 at 14:27)</a>:</h4>
<p>right now we kill every region that is out of scope at the point P</p>



<a name="126925867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925867">(May 22 2018 at 14:27)</a>:</h4>
<p>but that is "overkill" (no pun intended)</p>



<a name="126925872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925872">(May 22 2018 at 14:27)</a>:</h4>
<p>I am proposing that we only add a kill on the target Q of some edge P -&gt; Q where P is in the region but Q is not</p>



<a name="126925879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925879">(May 22 2018 at 14:28)</a>:</h4>
<blockquote>
<p>while the idea of "iterating over the live borrows" should be implementable with the state we are computing today</p>
</blockquote>
<p>true</p>



<a name="126925924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925924">(May 22 2018 at 14:28)</a>:</h4>
<p>anyway I'm not opposed to doing that first if you think it's easy</p>



<a name="126925927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925927">(May 22 2018 at 14:28)</a>:</h4>
<p>and/or trying both</p>



<a name="126925937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925937">(May 22 2018 at 14:28)</a>:</h4>
<p>hmm yes okay the kill-set would only have entries that are actually potentially gen'ed at some point that reaches that location</p>



<a name="126925952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925952">(May 22 2018 at 14:28)</a>:</h4>
<p>the other property I am banking on here is that kills for loans occur in two cases:</p>
<p>1. region ends<br>
2. the borrowed path is reassigned</p>
<p>and I assume 2 is rare.</p>



<a name="126925979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126925979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126925979">(May 22 2018 at 14:29)</a>:</h4>
<p>(meaning that the set of borrows being killed at any point will typically be equal to the set where region ends)</p>



<a name="126926052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126926052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126926052">(May 22 2018 at 14:30)</a>:</h4>
<p>(deleted)</p>



<a name="126926085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126926085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126926085">(May 22 2018 at 14:31)</a>:</h4>
<p>(still if you think it's easy to take advantage of the fact that we're in second phase — I guess that just means adding a flag somewhere to communicate that? — let's indeed do that and measure perf!)</p>



<a name="126926094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126926094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126926094">(May 22 2018 at 14:31)</a>:</h4>
<p>Ah lets talk about it in the meeting tonight</p>



<a name="126926099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126926099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126926099">(May 22 2018 at 14:31)</a>:</h4>
<p>We're way over time</p>



<a name="126926146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/126926146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#126926146">(May 22 2018 at 14:32)</a>:</h4>
<p>I'm going to switch back to diagnostics review now</p>



<a name="127005955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127005955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127005955">(May 24 2018 at 00:44)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> <a href="https://perf.rust-lang.org/compare.html?start=531e4ab7bc1a9064ae0b77ba16a9cd46832194e6&amp;end=e249596d949661791d44633eb5e78b1ae999782d&amp;stat=instructions:u" target="_blank" title="https://perf.rust-lang.org/compare.html?start=531e4ab7bc1a9064ae0b77ba16a9cd46832194e6&amp;end=e249596d949661791d44633eb5e78b1ae999782d&amp;stat=instructions:u">these are the perf results from your PR</a> — looking good! I'm assuming you didn't get a chance to look at the further improvements?</p>



<a name="127006000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127006000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127006000">(May 24 2018 at 00:44)</a>:</h4>
<p>we're still quite a bit slower doing clap check (NLL vs clean, for example)</p>



<a name="127006184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127006184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127006184">(May 24 2018 at 00:50)</a>:</h4>
<p>current profile information:</p>
<table>
<thead>
<tr>
<th>thing</th>
<th>percent (total)</th>
</tr>
</thead>
<tbody>
<tr>
<td>MIR borrowck</td>
<td>24%</td>
</tr>
<tr>
<td><code>└ compute_regions</code></td>
<td>10%</td>
</tr>
<tr>
<td><code>│└ type_check_internal</code></td>
<td>8%</td>
</tr>
<tr>
<td><code>└ do_dataflow</code></td>
<td>6%</td>
</tr>
<tr>
<td><code>│└ kill_loans_out_of_scope_at_location</code></td>
<td>5%</td>
</tr>
<tr>
<td><code>kill_loans_out_of_scope_at_location</code>(total)</td>
<td>10%</td>
</tr>
</tbody>
</table>



<a name="127022500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127022500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127022500">(May 24 2018 at 10:27)</a>:</h4>
<p>I haven't yet, sadly. I fully intend to but getting ready to move is taking more time than I anticipated.</p>



<a name="127159743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127159743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127159743">(May 27 2018 at 10:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I've submitted <a href="https://github.com/rust-lang/rust/pull/51106" target="_blank" title="https://github.com/rust-lang/rust/pull/51106">https://github.com/rust-lang/rust/pull/51106</a> for #50934. It has a rough implementation of what you described and it builds, but it's failing some tests and I've not had a chance to look into that yet. Apologies for the delay on getting around to this.</p>



<a name="127199303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127199303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127199303">(May 28 2018 at 10:23)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> thanks! I'll take a look shortly</p>



<a name="127222454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127222454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127222454">(May 28 2018 at 21:44)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Looking at the current error I'm getting on that PR and I'm struggling to work out the root cause.</p>



<a name="127225864"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127225864" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127225864">(May 28 2018 at 23:51)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> ok I'll take a look tomorrow</p>



<a name="127241604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127241604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127241604">(May 29 2018 at 08:56)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> I think I'll just have to build it. That said, I think we could optimize this DFS quite a bit (and I can leave a few tips on that if you want). But I don't see an obvious problem yet.</p>



<a name="127241625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127241625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127241625">(May 29 2018 at 08:56)</a>:</h4>
<p>er, maybe I do... I'll leave some comments</p>



<a name="127241794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127241794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127241794">(May 29 2018 at 09:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Thanks, I'll take a look as  soon as I get a chance.</p>



<a name="127242009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127242009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127242009">(May 29 2018 at 09:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> left a review but I'm not sure if I found the problem per se</p>



<a name="127242072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127242072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127242072">(May 29 2018 at 09:06)</a>:</h4>
<p>interestingly, I was profiling the <code>webrender</code> build and it looks like MIR borrowck is only 4%</p>



<a name="127242097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127242097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127242097">(May 29 2018 at 09:07)</a>:</h4>
<p>but on perf it seems to show significant overhead</p>



<a name="127242100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127242100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127242100">(May 29 2018 at 09:07)</a>:</h4>
<p>maybe we're not measuring the same thing somehow</p>



<a name="127242101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127242101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127242101">(May 29 2018 at 09:07)</a>:</h4>
<p>Thanks, that's great.</p>



<a name="127242171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127242171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127242171">(May 29 2018 at 09:09)</a>:</h4>
<p>I had the same issue trying to see what made webrender slow on Friday</p>



<a name="127242495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127242495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127242495">(May 29 2018 at 09:19)</a>:</h4>
<p>looking via <code>time</code> I see 20s vs 18s or so... (from a single run) idk</p>



<a name="127262912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127262912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127262912">(May 29 2018 at 17:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Pushed up a commit that addresses those points - not sure what I was thinking when I did the initial implementation, should have been much cleaner.</p>



<a name="127262921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127262921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127262921">(May 29 2018 at 17:25)</a>:</h4>
<p>Noticed locally that it is still causing that error, but on even more tests.</p>



<a name="127262996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127262996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127262996">(May 29 2018 at 17:26)</a>:</h4>
<p>I guess that's progress =)</p>



<a name="127263001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263001">(May 29 2018 at 17:27)</a>:</h4>
<p>I do think it's possible for this to change behavior, but I would have expected (I think) fewer errors, not more</p>



<a name="127263069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263069">(May 29 2018 at 17:28)</a>:</h4>
<p>(or I could imagine it anyway)</p>



<a name="127263073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263073">(May 29 2018 at 17:28)</a>:</h4>
<p>I'll try to do a local build I suppose to see what's going on</p>



<a name="127263108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263108">(May 29 2018 at 17:29)</a>:</h4>
<p>It seems like some part of the code after this is expecting there to be more errors than there now are.</p>



<a name="127263128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263128">(May 29 2018 at 17:30)</a>:</h4>
<p>ok. So I could imagine that you end up with a borrow like <code>&amp;'X foo</code> where <code>'X</code> encompasses not only some points reachable from the borrow but also some that are not</p>



<a name="127263171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263171">(May 29 2018 at 17:30)</a>:</h4>
<p>and this new code would not include those in the borrow</p>



<a name="127263183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263183">(May 29 2018 at 17:30)</a>:</h4>
<p>that said</p>



<a name="127263186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263186">(May 29 2018 at 17:30)</a>:</h4>
<p>hmm</p>



<a name="127263192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263192">(May 29 2018 at 17:30)</a>:</h4>
<p>I guess I don't think that should change behavior really</p>



<a name="127263197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263197">(May 29 2018 at 17:30)</a>:</h4>
<p>will have to investigate</p>



<a name="127263208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263208">(May 29 2018 at 17:30)</a>:</h4>
<p>(i.e., because before we would have had a GEN at the borrow, and a KILL when you exit the region, and no subsequent GEN)</p>



<a name="127263224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263224">(May 29 2018 at 17:31)</a>:</h4>
<p>I also noticed that on some tests, there were more errors.</p>



<a name="127263236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263236">(May 29 2018 at 17:31)</a>:</h4>
<p>Anecdotally it seemed like that only happened when generators were involved.</p>



<a name="127263242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263242">(May 29 2018 at 17:31)</a>:</h4>
<p>But 90% of the failures were the same error as before.</p>



<a name="127263335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263335">(May 29 2018 at 17:33)</a>:</h4>
<p>interesting ok</p>



<a name="127263476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263476">(May 29 2018 at 17:36)</a>:</h4>
<p>I'm just not sure where to start in tracing the effect of the change I'm making through to the region inference code that's failing to try and identify what it is expecting.</p>



<a name="127263490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263490">(May 29 2018 at 17:36)</a>:</h4>
<p>ok, I'm doing a local build — but if you want me to take a look faster, posting the output and <code>-Zdump-mir=nll</code> results from a test would help</p>



<a name="127263785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263785">(May 29 2018 at 17:43)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <a href="https://gist.github.com/davidtwco/e408a382d1af2822eeacebff93315ff8" target="_blank" title="https://gist.github.com/davidtwco/e408a382d1af2822eeacebff93315ff8">https://gist.github.com/davidtwco/e408a382d1af2822eeacebff93315ff8</a></p>



<a name="127263872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263872">(May 29 2018 at 17:44)</a>:</h4>
<p>ok, <code>issue-45697.rs</code>is not a generator example :)</p>



<a name="127263899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263899">(May 29 2018 at 17:45)</a>:</h4>
<p>No, that's one of the "couldn't find a constraint to blame" ones.</p>



<a name="127263948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263948">(May 29 2018 at 17:46)</a>:</h4>
<p>ah, I see. ok</p>



<a name="127263955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263955">(May 29 2018 at 17:46)</a>:</h4>
<p>There's only a handful of generator ones and the rest are like that.</p>



<a name="127263980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263980">(May 29 2018 at 17:47)</a>:</h4>
<p>it might be helpful <span class="user-mention" data-user-id="116107">@David Wood</span> to include the "kill locations" in the mir-dump output</p>



<a name="127263989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127263989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127263989">(May 29 2018 at 17:47)</a>:</h4>
<p>in some form or other</p>



<a name="127264036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264036">(May 29 2018 at 17:48)</a>:</h4>
<p>Is that a functionality that exists already?</p>



<a name="127264054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264054">(May 29 2018 at 17:48)</a>:</h4>
<p>is what?</p>



<a name="127264055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264055">(May 29 2018 at 17:48)</a>:</h4>
<p>I mean mir-dump exists</p>



<a name="127264059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264059">(May 29 2018 at 17:48)</a>:</h4>
<p>we'd have to extend it to include this info</p>



<a name="127264070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264070">(May 29 2018 at 17:49)</a>:</h4>
<p>that...could be hard</p>



<a name="127264080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264080">(May 29 2018 at 17:49)</a>:</h4>
<p>just because of the way the phasing works out</p>



<a name="127264084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264084">(May 29 2018 at 17:49)</a>:</h4>
<p>probably easier would be to dump some info with <code>RUST_LOG</code> for now ;)</p>



<a name="127264092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264092">(May 29 2018 at 17:49)</a>:</h4>
<p>tl;dr I'd like to know:</p>
<ul>
<li>which borrow it is trying to report an error about and failing</li>
<li>what the kill locations are that you inferred for this borrow</li>
</ul>



<a name="127264160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264160">(May 29 2018 at 17:50)</a>:</h4>
<p>that said, I have a local build now</p>



<a name="127264177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264177">(May 29 2018 at 17:50)</a>:</h4>
<p>Ah, I wasn't sure if there was a flag existing that would output the kill locations with the dump.</p>



<a name="127264242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264242">(May 29 2018 at 17:52)</a>:</h4>
<p>not that I know of</p>



<a name="127264245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264245">(May 29 2018 at 17:53)</a>:</h4>
<p>it's ok I'm doing a local build with the <code>debug!</code> I want</p>



<a name="127264258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264258">(May 29 2018 at 17:53)</a>:</h4>
<p>man I really want to refactor the borrow check sometimes :)</p>



<a name="127264261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264261">(May 29 2018 at 17:53)</a>:</h4>
<p>not exactly sure <em>how</em></p>



<a name="127264264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264264">(May 29 2018 at 17:53)</a>:</h4>
<p>I just feel like the code is cruftier than it should be for its age ;)</p>



<a name="127264266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264266">(May 29 2018 at 17:53)</a>:</h4>
<p>but we'll wait until polonius is done I guess</p>



<a name="127264277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264277">(May 29 2018 at 17:53)</a>:</h4>
<p>in particular i'd love to have really smooth debugging etc :) we have a lot of it...</p>



<a name="127264282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264282">(May 29 2018 at 17:53)</a>:</h4>
<p>...but also <code>borrow_check/mod.rs</code> is too big</p>



<a name="127264520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264520">(May 29 2018 at 17:59)</a>:</h4>
<p>Yeah, it's a bit hard to browse without ack or ctags.</p>



<a name="127264706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264706">(May 29 2018 at 18:03)</a>:</h4>
<p>do you mind if I push a few minor things to your branch <span class="user-mention" data-user-id="116107">@David Wood</span> ?</p>



<a name="127264714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264714">(May 29 2018 at 18:03)</a>:</h4>
<p>/me does it anyway</p>



<a name="127264717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264717">(May 29 2018 at 18:03)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> go ahead</p>



<a name="127264722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264722">(May 29 2018 at 18:03)</a>:</h4>
<p>so based on the debugging statements I added, I see:</p>



<a name="127264766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264766">(May 29 2018 at 18:04)</a>:</h4>
<div class="codehilite"><pre><span></span>DEBUG 2018-05-29T18:01:13Z: rustc_mir::dataflow::impls::borrows: borrow bw2 starts at bb0[13]
DEBUG 2018-05-29T18:01:13Z: rustc_mir::dataflow::impls::borrows: borrow bw2 gets killed at bb1[0]
</pre></div>



<a name="127264771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264771">(May 29 2018 at 18:04)</a>:</h4>
<p>this seems to be the problem: in particular, if you look at the MIR, there ought to be some kills along the non-unwind path</p>



<a name="127264778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264778">(May 29 2018 at 18:04)</a>:</h4>
<p>I think your new DFS is a bit <em>too</em> efficient =)</p>



<a name="127264802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264802">(May 29 2018 at 18:05)</a>:</h4>
<p>that is, you jump from a location like <code>BB1[2]</code> to <code>BB1[N]</code> where <code>N</code> is the end without visiting the points in between sort of</p>



<a name="127264808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264808">(May 29 2018 at 18:05)</a>:</h4>
<p>that may be the problem</p>



<a name="127264859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264859">(May 29 2018 at 18:06)</a>:</h4>
<p>Ah!</p>



<a name="127264861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264861">(May 29 2018 at 18:06)</a>:</h4>
<p>That explains why there are more errors.</p>



<a name="127264866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264866">(May 29 2018 at 18:06)</a>:</h4>
<p>I did that before.</p>



<a name="127264879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264879">(May 29 2018 at 18:07)</a>:</h4>
<p>yeah so in this case I think that <code>bb4[1]</code> ought to be a kill point too</p>



<a name="127264887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264887">(May 29 2018 at 18:07)</a>:</h4>
<p>since the region in question:</p>
<div class="codehilite"><pre><span></span>| &#39;_#5r    | {bb0[8..=15], bb2[0..=3], bb3[0..=2], bb4[0]}
</pre></div>



<a name="127264893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264893">(May 29 2018 at 18:07)</a>:</h4>
<p>ends at <code>bb4[0]</code></p>



<a name="127264896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264896">(May 29 2018 at 18:07)</a>:</h4>
<p>also, we should add <em>that</em> to the <code>debug!</code> — that is, the value of the borrow region</p>



<a name="127264902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127264902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127264902">(May 29 2018 at 18:07)</a>:</h4>
<p>would've been useful</p>



<a name="127265489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127265489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127265489">(May 29 2018 at 18:17)</a>:</h4>
<p>Building locally with  it visiting each statement and not just the terminators - like it did originally.</p>



<a name="127265690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127265690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127265690">(May 29 2018 at 18:21)</a>:</h4>
<p>ok</p>



<a name="127266594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127266594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127266594">(May 29 2018 at 18:38)</a>:</h4>
<p>Seems like with that change, there are even more errors! Well, that's not strictly true, while lots of tests are erroring, it's because the compiler isn't erroring when we expect it to.</p>



<a name="127266703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127266703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127266703">(May 29 2018 at 18:41)</a>:</h4>
<p>heh:)</p>



<a name="127266708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127266708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127266708">(May 29 2018 at 18:41)</a>:</h4>
<p>did you push said change?</p>



<a name="127266713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127266713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127266713">(May 29 2018 at 18:41)</a>:</h4>
<p>Just did.</p>



<a name="127267231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127267231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127267231">(May 29 2018 at 18:52)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> what's an example test that fails?</p>



<a name="127267241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127267241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127267241">(May 29 2018 at 18:52)</a>:</h4>
<p><code>drop-may-dangle</code> should fail, it doesn't.</p>



<a name="127267252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127267252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127267252">(May 29 2018 at 18:52)</a>:</h4>
<p>that is, <code>ui/nll/drop-may-dangle</code>.</p>



<a name="127267675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127267675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127267675">(May 29 2018 at 19:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> actually... I think that test <em>should</em> pass</p>



<a name="127267687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127267687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127267687">(May 29 2018 at 19:01)</a>:</h4>
<p>note:</p>
<div class="codehilite"><pre><span></span>// compile-flags:-Zborrowck=mir
// compile-pass
</pre></div>



<a name="127267794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127267794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127267794">(May 29 2018 at 19:03)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Oops, read <code>drop-may-no-dangle</code> wrong.</p>



<a name="127268194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127268194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127268194">(May 29 2018 at 19:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> pushed a few more things, including one bug fix, running tests locally</p>



<a name="127268301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127268301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127268301">(May 29 2018 at 19:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Sounds good - sorry about being a bit useless with this one, not sure where my head is at.</p>



<a name="127268496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127268496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127268496">(May 29 2018 at 19:16)</a>:</h4>
<p>with that fix <span class="user-mention" data-user-id="116107">@David Wood</span> it passes <code>src/test/ui</code></p>



<a name="127268503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127268503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127268503">(May 29 2018 at 19:17)</a>:</h4>
<p><code>./x.py test --stage 1 src/test/ui</code></p>



<a name="127268504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127268504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127268504">(May 29 2018 at 19:17)</a>:</h4>
<p>Oh, great.</p>



<a name="127275755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127275755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127275755">(May 29 2018 at 21:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> I'm going to profile your branch btw</p>



<a name="127275916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127275916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127275916">(May 29 2018 at 21:44)</a>:</h4>
<p>Awesome - looking forward to seeing how it does.</p>



<a name="127281917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127281917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127281917">(May 30 2018 at 00:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> based on my profiles, that PR seems to drop MIR borrowck from 24% of the total down to 16% — <code>kill_loans_out_of_scope_at_location</code> is not visible, and the pre-computation cost <em>seems</em> cheap. I'm doing another build with some <code>#[inline(never)]</code> calls to help me isolate that, but I am hopeful this will be a decent win.</p>



<a name="127281919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127281919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127281919">(May 30 2018 at 00:19)</a>:</h4>
<p>The big cost seems to be the type check again</p>



<a name="127281985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127281985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127281985">(May 30 2018 at 00:21)</a>:</h4>
<table>
<thead>
<tr>
<th>Phase</th>
<th>Percent of total</th>
</tr>
</thead>
<tbody>
<tr>
<td>MIR Borrowck</td>
<td>16%</td>
</tr>
<tr>
<td>- Type check</td>
<td>8%</td>
</tr>
<tr>
<td>- - <code>take_and_reset_obligations</code></td>
<td>4%</td>
</tr>
<tr>
<td>- Dataflow</td>
<td>2%</td>
</tr>
</tbody>
</table>



<a name="127281988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127281988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127281988">(May 30 2018 at 00:21)</a>:</h4>
<p>not sure what the other 6% are yet</p>



<a name="127282073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127282073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127282073">(May 30 2018 at 00:23)</a>:</h4>
<p>I didn't measure the raw time before/after, which would be useful of course... I'll guess we'll see it from perf though</p>



<a name="127292081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127292081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127292081">(May 30 2018 at 06:01)</a>:</h4>
<p>Nice.</p>



<a name="127305496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127305496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127305496">(May 30 2018 at 12:40)</a>:</h4>
<p>ok <span class="user-mention" data-user-id="116107">@David Wood</span> your branch landed, the effects are not yet visible on perf but we should keep our eye on it</p>



<a name="127305503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127305503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127305503">(May 30 2018 at 12:40)</a>:</h4>
<p>there are however a bunch of new tests on perf — it's clear we're not "out of the woods" yet I would say</p>



<a name="127306573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127306573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127306573">(May 30 2018 at 13:04)</a>:</h4>
<p>I saw that it landed.</p>



<a name="127312213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127312213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127312213">(May 30 2018 at 15:08)</a>:</h4>
<p>here are the <a href="http://perf.rust-lang.org/compare.html?start=524ad9b9e03656f3fdeb03ed82fe78db3916e566&amp;end=01aca8254fefbace3ec9fa9de8214cae2f7a07cd&amp;stat=instructions%3Au" target="_blank" title="http://perf.rust-lang.org/compare.html?start=524ad9b9e03656f3fdeb03ed82fe78db3916e566&amp;end=01aca8254fefbace3ec9fa9de8214cae2f7a07cd&amp;stat=instructions%3Au">perf.rlo results</a> btw</p>



<a name="127312228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127312228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127312228">(May 30 2018 at 15:08)</a>:</h4>
<p>oh, nice!</p>



<a name="127312241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127312241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127312241">(May 30 2018 at 15:09)</a>:</h4>
<p>pretty solid win</p>



<a name="127312263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127312263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127312263">(May 30 2018 at 15:09)</a>:</h4>
<p>still, the disparate impact (e.g., on webrender etc) shows that we gotta start profiling other crates...</p>



<a name="127312347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127312347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127312347">(May 30 2018 at 15:10)</a>:</h4>
<p>hmm simulacrum sent another link on discord which is not yet available, that was the initial one on GH ...</p>



<a name="127312359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127312359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127312359">(May 30 2018 at 15:10)</a>:</h4>
<p>one is probably from the try run</p>



<a name="127312361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127312361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127312361">(May 30 2018 at 15:10)</a>:</h4>
<p>versus the final merge</p>



<a name="127312376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127312376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127312376">(May 30 2018 at 15:11)</a>:</h4>
<p>interesting that we are still seeing clap-rs be like 50% slower with NLL</p>



<a name="127312377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127312377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127312377">(May 30 2018 at 15:11)</a>:</h4>
<p>oh yes, so this one must be the try build</p>



<a name="127312384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127312384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127312384">(May 30 2018 at 15:11)</a>:</h4>
<p>the (NLL - clean) / NLL value is 32%— I have to check what %age is <code>borrowck_mir</code></p>



<a name="127312438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127312438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127312438">(May 30 2018 at 15:12)</a>:</h4>
<p>I feel like it was significantly less than that</p>



<a name="127312440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127312440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127312440">(May 30 2018 at 15:12)</a>:</h4>
<p>which indicates some other source of overhead</p>



<a name="127312453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127312453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127312453">(May 30 2018 at 15:12)</a>:</h4>
<p>right, before I posted this:</p>
<table>
<thead>
<tr>
<th>Phase</th>
<th>Percent of total</th>
</tr>
</thead>
<tbody>
<tr>
<td>MIR Borrowck</td>
<td>16%</td>
</tr>
<tr>
<td>- Type check</td>
<td>8%</td>
</tr>
<tr>
<td>- - <code>take_and_reset_obligations</code></td>
<td>4%</td>
</tr>
<tr>
<td>- Dataflow</td>
<td>2%</td>
</tr>
</tbody>
</table>



<a name="127312460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127312460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127312460">(May 30 2018 at 15:12)</a>:</h4>
<p>so where is that other 16%?</p>



<a name="127315147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127315147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127315147">(May 30 2018 at 16:03)</a>:</h4>
<p>it's interesting that <span class="user-mention" data-user-id="116106">@Reed Koser</span>'s <a href="https://github.com/rust-lang/rust/commit/910e29a45b8ffa612340eca1b9eb7fc144a37be1" target="_blank" title="https://github.com/rust-lang/rust/commit/910e29a45b8ffa612340eca1b9eb7fc144a37be1">PR</a> appears to have led to a <a href="http://perf.rust-lang.org/compare.html?start=7942022bf75be46e04ffc7874f705076a16da697&amp;end=910e29a45b8ffa612340eca1b9eb7fc144a37be1&amp;stat=instructions:u" target="_blank" title="http://perf.rust-lang.org/compare.html?start=7942022bf75be46e04ffc7874f705076a16da697&amp;end=910e29a45b8ffa612340eca1b9eb7fc144a37be1&amp;stat=instructions:u">small perf regression</a></p>



<a name="127315149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127315149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127315149">(May 30 2018 at 16:03)</a>:</h4>
<p>I don't know why exactly that is</p>



<a name="127315152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127315152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127315152">(May 30 2018 at 16:03)</a>:</h4>
<p>probably not worth worrying about</p>



<a name="127315985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127315985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127315985">(May 30 2018 at 16:22)</a>:</h4>
<p>Huh, probably caused LLVM to miss some inter-procedural optimizations? That PR also introduced a number of extra DefID/tcx copies so if those weren't eliminated they could explain it. I guess we should remember to fold all that code back together once Polonius borrowck lands properly</p>



<a name="127315999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127315999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127315999">(May 30 2018 at 16:23)</a>:</h4>
<p>yeah, maybe something like that. it's prety much in the noise anyway.</p>



<a name="127316000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127316000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127316000">(May 30 2018 at 16:24)</a>:</h4>
<p>I wish a regression like that mattered :)</p>



<a name="127316041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127316041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127316041">(May 30 2018 at 16:24)</a>:</h4>
<p>ah well actually</p>



<a name="127316042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127316042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127316042">(May 30 2018 at 16:24)</a>:</h4>
<p>8% on clap is not nothing</p>



<a name="127316049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127316049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127316049">(May 30 2018 at 16:24)</a>:</h4>
<p>I was looking at the wrong column =)</p>



<a name="127316050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127316050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127316050">(May 30 2018 at 16:24)</a>:</h4>
<p>5% on clap, I guess, 8% on clap-check</p>



<a name="127316052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127316052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127316052">(May 30 2018 at 16:24)</a>:</h4>
<p>either way, maybe worth investigating</p>



<a name="127316074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127316074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Reed Koser <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127316074">(May 30 2018 at 16:26)</a>:</h4>
<p><span class="emoji emoji-1f44d" title="+1">:+1:</span></p>



<a name="127336331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127336331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127336331">(May 31 2018 at 00:02)</a>:</h4>
<p>btw y'all note the new <a href="http://perf.rust-lang.org/nll-dashboard.html" target="_blank" title="http://perf.rust-lang.org/nll-dashboard.html">http://perf.rust-lang.org/nll-dashboard.html</a> that helps to get a (numeric) picture of how much slower NLL is at any given commit</p>



<a name="127336335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127336335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127336335">(May 31 2018 at 00:02)</a>:</h4>
<p>seems like we should investigate inflate :)</p>



<a name="127342328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127342328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127342328">(May 31 2018 at 03:11)</a>:</h4>
<p>What's 1000% among friends</p>



<a name="127346386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127346386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127346386">(May 31 2018 at 05:38)</a>:</h4>
<p>while inflate is a special case IIRC, an older version of the crate which contained a lot of macro generated code, some of that overhead must be present in the other benchmarks :)</p>



<a name="127346394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127346394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127346394">(May 31 2018 at 05:39)</a>:</h4>
<p>I'll look at its NLL facts later today</p>



<a name="127348139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127348139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127348139">(May 31 2018 at 06:40)</a>:</h4>
<p>(oops I don't have a rustc with debuginfo here, making valgrind/callgrind unhappy :3 — however there is one slow function in -Ztime-passes: <code>{{impl}}[3]::next_state))</code> which might be interesting to compare with polonius)</p>



<a name="127349630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127349630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127349630">(May 31 2018 at 07:26)</a>:</h4>
<p>(so on this terrible machine 1) it's faster with datafrog_opt (I have high variance but seemed like 40%) 2) haven't tried leapfrog yet, 3) this fn passes the location-insensitive analysis, in around a 1/10th of the -Ztime-passes time)</p>



<a name="127353338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127353338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127353338">(May 31 2018 at 09:22)</a>:</h4>
<p>interesting, but those two measurements aren't really directly comparable. The <code>-Ztime-passes</code> includes the overhead of MIR typeck etc, which we need regardless — that is, polonius only kicks in once it has the facts, but we still have to generate them.</p>



<a name="127353596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127353596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127353596">(May 31 2018 at 09:30)</a>:</h4>
<p>yeah it was mostly another datapoint because I couldn't profile rustc then :)</p>



<a name="127378123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127378123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127378123">(May 31 2018 at 19:02)</a>:</h4>
<p>I've been digging through profiles of clap and I see some stuff to do but not <em>that</em> much. Have to think about if there is a way to radically improve perf of the type-check — I see about a 12% (of total time) win. Not bad, but we'd need to make a 40% total time win to get it "as far as before" (at least on my machine, which does somewhat more evenly than the perf machine for reasons unknown)</p>



<a name="127385973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127385973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127385973">(May 31 2018 at 22:04)</a>:</h4>
<p>Is this type checking new/unique to NLL world?</p>



<a name="127406205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127406205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127406205">(Jun 01 2018 at 08:34)</a>:</h4>
<p>sort of, yes</p>



<a name="127406208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127406208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127406208">(Jun 01 2018 at 08:35)</a>:</h4>
<p>we were doing some limited type-checking on MIR before, but only as a sanity check</p>



<a name="127406217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127406217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127406217">(Jun 01 2018 at 08:35)</a>:</h4>
<p>still, this type-checking doesn't have to do the "hard work" of other type-checking. I have to dig into what is making it expensive more closely.</p>



<a name="127422738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127422738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127422738">(Jun 01 2018 at 15:51)</a>:</h4>
<p>I've been doing some digging; I have to step out now but I see some promising leads I think</p>



<a name="127613570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127613570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127613570">(Jun 05 2018 at 18:05)</a>:</h4>
<p>so <span class="user-mention" data-user-id="116106">@Reed Koser</span> (or others) — looking a bit more at the profile from clap-rs, I see that <code>access_place</code> is 5% of total time</p>



<a name="127613623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127613623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127613623">(Jun 05 2018 at 18:06)</a>:</h4>
<p>huh, actually this profile is kinda' weird</p>



<a name="127613648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127613648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127613648">(Jun 05 2018 at 18:07)</a>:</h4>
<p>well, ok, some 8% is spent in <code>visit_mir</code> -- what is that I wonder ..</p>



<a name="127613736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127613736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127613736">(Jun 05 2018 at 18:09)</a>:</h4>
<p>maybe it is <code>replace_regions_in_mir</code> ?</p>



<a name="127613742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127613742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127613742">(Jun 05 2018 at 18:09)</a>:</h4>
<p>/me adds some <code>#[inline(never)]</code></p>



<a name="127773918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127773918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127773918">(Jun 08 2018 at 14:10)</a>:</h4>
<p>this branch is...getting long...</p>
<div class="codehilite"><pre><span></span>Unmerged into rust-lang/master (39)
04c83ed7f7 nll-perf-examination nikomatsakis/nll-perf-examination replace `LexicalRegionConstraintData` with `QueryRegionConstraint`
49aa9424e6 extract the handling of region constraints from queries
66f0ae9531 extract a helper for `make_query_result` that skips canonicalization
53766377eb move `make_query_response` into method on infcx
61b2470cbf break canonicalizer into submodules to make it easier to comprehend
cf156508c5 promote canonical into a module
ed774b1998 align the `type-op` outputs with what canonicalized queries give
e93fd74df5 mk `fully_perform_op_and_get_region_constraint_data` a TypeOp method
728a378715 remove the `TypeOp` vs `InfcxTypeOp` distinction
c461db2690 promote `type_op` into a `mod.rs` file
9eb1f11e92 introduce `DropckOutlives` type-op
84cb1929dd make `TypeOp` implement debug instead of carrying a closure
10e6db0d5b extract a `enabled` helper to remove some ad-hoc conditionals
56a47a3661 make `TypeOutlives` parameterized over a delegate
21c511efe9 obligations.rs: rustfmt
f384a7341f resolve type vars *before* entering `type_must_outlive`
6109ae6c7f create `InfcxTypeOp` that only depend on an `infcx`
af508f4f5c make normalize into an op
3152d8583b let `trivial_noop` take ownership of `self`
27546cc5a9 make `normalize` take ownership of the thing to be normalized
4253474fc8 introduce `prove_predicates` type op
c4fb817e1e introduce `trivial_noop` to accommodate micro-optimizations
9d0c0711d9 introduce `Eq` type-op
d42cddc61b introduce `Subtype` type_op
31fffa05e8 introduce `type_op`
e35a680d33 use `DUMMY_NODE_ID` as the `body_id` during NLL type-checking
9fa1f202c7 convert type-check constraints into NLL constraints on the fly
c1865024e6 rename `Constraint` to `OutlivesConstraint`
cecf8bb8c3 WIP Region constraint data method name
2988d98986 WIP region constraint data
cb8a0f6c52 key drop-data computation by ty, not var
1258830e83 update some tests affected by some of the prior tweaks
99edb16fdc cache the `dropck_outlives` computation per variable
752d850a3e extract out `fully_perform_op_and_get_constraint_constraints`
820f863122 put the `RegionConstraintData` into an `Rc`
ff5dc41868 librustc_mir/borrow_check/nll/type_check/mod.rs: rustfmt
50dbbaf04b micro-optimize empty predicate and normalize lists
82dcf52494 skip `eq_types` and `sub_types` when the two types are equal
a75c924b93 add some instrumentation
</pre></div>



<a name="127773970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127773970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127773970">(Jun 08 2018 at 14:10)</a>:</h4>
<p>/me hopes this works</p>



<a name="127776559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127776559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127776559">(Jun 08 2018 at 15:06)</a>:</h4>
<p>Poor reviewer</p>



<a name="127776613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127776613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127776613">(Jun 08 2018 at 15:07)</a>:</h4>
<p>I'll make it easy for them. Just r+ it already.</p>



<a name="127776624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127776624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127776624">(Jun 08 2018 at 15:07)</a>:</h4>
<p>Each step is quite self-contained, but it's a big transformation... I guess I could probably land some of these intermediate steps.</p>



<a name="127776630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/127776630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#127776630">(Jun 08 2018 at 15:07)</a>:</h4>
<p>not an obvious win though</p>



<a name="128063062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128063062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128063062">(Jun 14 2018 at 12:54)</a>:</h4>
<p>The perf results of my branch that adds a lot more caching are <a href="https://github.com/rust-lang/rust/pull/51538#issuecomment-397283915" target="_blank" title="https://github.com/rust-lang/rust/pull/51538#issuecomment-397283915">here</a> — pretty decent. Worth landing on its own, though not yet as good as I hoped. That said, that branch has some pretty inefficient conversions of data back and forth that I hope to eliminate...</p>
<ul>
<li><a href="http://perf.rust-lang.org/compare.html?start=cd1105437cd433c12ae5132c9632e01d387b2384&amp;end=adbbd12ea685afa27f98c032745585bb98f42e81&amp;stat=instructions%3Au" target="_blank" title="http://perf.rust-lang.org/compare.html?start=cd1105437cd433c12ae5132c9632e01d387b2384&amp;end=adbbd12ea685afa27f98c032745585bb98f42e81&amp;stat=instructions%3Au">Comparison</a></li>
<li>Dashboard: <a href="http://perf.rust-lang.org/nll-dashboard.html?commit=cd1105437cd433c12ae5132c9632e01d387b2384&amp;stat=instructions%3Au" target="_blank" title="http://perf.rust-lang.org/nll-dashboard.html?commit=cd1105437cd433c12ae5132c9632e01d387b2384&amp;stat=instructions%3Au">before</a>, <a href="http://perf.rust-lang.org/nll-dashboard.html?commit=adbbd12ea685afa27f98c032745585bb98f42e81&amp;stat=instructions%3Au" target="_blank" title="http://perf.rust-lang.org/nll-dashboard.html?commit=adbbd12ea685afa27f98c032745585bb98f42e81&amp;stat=instructions%3Au">after</a></li>
</ul>



<a name="128063237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128063237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128063237">(Jun 14 2018 at 12:59)</a>:</h4>
<p>it's interesting though to look at the ones where this didn't help <em>at all</em> — e.g., <code>syn</code></p>



<a name="128063254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128063254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128063254">(Jun 14 2018 at 12:59)</a>:</h4>
<p><span class="user-mention" data-user-id="116113">@lqd</span> it may be worth revisiting the profile of <code>syn</code></p>



<a name="128063264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128063264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128063264">(Jun 14 2018 at 12:59)</a>:</h4>
<p>not sure if <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> logged some notes on that, i'll have to check later</p>



<a name="128063362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128063362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128063362">(Jun 14 2018 at 13:01)</a>:</h4>
<p>I don't think they did yet, according to the <a href="https://paper.dropbox.com/doc/NLL-Performance-Tracking-Doc-dRlUMiWT8eexf80FTrYj8" target="_blank" title="https://paper.dropbox.com/doc/NLL-Performance-Tracking-Doc-dRlUMiWT8eexf80FTrYj8">Paper document</a></p>



<a name="128065803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128065803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128065803">(Jun 14 2018 at 13:55)</a>:</h4>
<p>hey, sorry, notes about what?</p>



<a name="128065875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128065875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128065875">(Jun 14 2018 at 13:56)</a>:</h4>
<p>about <code>syn</code>?</p>



<a name="128066621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128066621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128066621">(Jun 14 2018 at 14:11)</a>:</h4>
<p>yes</p>



<a name="128071162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128071162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128071162">(Jun 14 2018 at 15:51)</a>:</h4>
<p>I can build that</p>



<a name="128071548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128071548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128071548">(Jun 14 2018 at 15:59)</a>:</h4>
<div class="codehilite"><pre><span></span>[santiago@archlinux syn (master)]$ perf focus &#39;{do_mir_borrowck}&#39; --tree-callees --tree-min-percent 3
Matcher    : {do_mir_borrowck}
Matches    : 40
Not Matches: 173
Percentage : 18%

Tree
| matched `{do_mir_borrowck}` (18% total, 0% self)
: | rustc_mir::borrow_check::nll::compute_regions (14% total, 0% self)
: : | rustc_mir::borrow_check::nll::type_check::type_check (13% total, 0% self)
: : : | rustc_mir::borrow_check::nll::type_check::type_check_internal (13% total, 0% self)
: : : : | rustc_mir::borrow_check::nll::type_check::type_check::_$u7b$$u7b$closure$u7d$$u7d$::hf6df3047d9ec27be (9% total, 0% self)
: : : : : | rustc_mir::borrow_check::nll::type_check::liveness::generate (9% total, 0% self)
: : : : : : | rustc_mir::borrow_check::nll::type_check::TypeChecker::fully_perform_op (7% total, 0% self)
: : : : : : : | rustc::infer::InferCtxt::commit_if_ok (5% total, 0% self)
: : : : : : : : | rustc::traits::query::dropck_outlives::&lt;impl rustc::infer::at::At&lt;&#39;cx, &#39;gcx, &#39;tcx&gt;&gt;::dropck_outlives (3% total, 0% self)
</pre></div>



<a name="128071997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128071997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128071997">(Jun 14 2018 at 16:08)</a>:</h4>
<p>have updated the doc</p>



<a name="128072005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128072005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128072005">(Jun 14 2018 at 16:09)</a>:</h4>
<p>btw, using a rustc build from june 6th</p>



<a name="128072012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128072012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128072012">(Jun 14 2018 at 16:09)</a>:</h4>
<p>I can update if something important has happened</p>



<a name="128074872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074872">(Jun 14 2018 at 17:12)</a>:</h4>
<p>btw, have updated this thing and ran again</p>



<a name="128074876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074876">(Jun 14 2018 at 17:13)</a>:</h4>
<div class="codehilite"><pre><span></span>Matcher    : {do_mir_borrowck}
Matches    : 45
Not Matches: 145
Percentage : 23%

Tree
| matched `{do_mir_borrowck}` (23% total, 0% self)
: | rustc_mir::borrow_check::nll::compute_regions (17% total, 0% self)
: : | rustc_mir::borrow_check::nll::type_check::type_check (14% total, 0% self)
: : : | rustc_mir::borrow_check::nll::type_check::type_check_internal (14% total, 0% self)
: : : : | rustc_mir::borrow_check::nll::type_check::type_check::_$u7b$$u7b$closure$u7d$$u7d$::hf6df3047d9ec27be (12% total, 0% self)
: : : : : | rustc_mir::borrow_check::nll::type_check::liveness::generate (12% total, 0% self)
: : : : : : | rustc_mir::borrow_check::nll::type_check::TypeChecker::fully_perform_op (9% total, 1% self)
: : : : : : : | rustc::infer::InferCtxt::commit_if_ok (7% total, 0% self)
: : : : : : : : | rustc::traits::query::dropck_outlives::&lt;impl rustc::infer::at::At&lt;&#39;cx, &#39;gcx, &#39;tcx&gt;&gt;::dropck_outlives (5% total, 0% self)
: : : : : : : : : | rustc::infer::canonical::&lt;impl rustc::infer::InferCtxt&lt;&#39;cx, &#39;gcx, &#39;tcx&gt;&gt;::instantiate_query_result (3% total, 0% self)
</pre></div>



<a name="128074883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074883">(Jun 14 2018 at 17:13)</a>:</h4>
<p>5% worser since june 6th</p>



<a name="128074896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074896">(Jun 14 2018 at 17:13)</a>:</h4>
<p>unsure about the standard deviation of what we are running</p>



<a name="128074936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074936">(Jun 14 2018 at 17:14)</a>:</h4>
<p>thanks!</p>



<a name="128074940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074940">(Jun 14 2018 at 17:14)</a>:</h4>
<p>should I run this several times and take an average?</p>



<a name="128074941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074941">(Jun 14 2018 at 17:14)</a>:</h4>
<p>nah</p>



<a name="128074945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074945">(Jun 14 2018 at 17:14)</a>:</h4>
<p>it looks fairly consistent</p>



<a name="128074947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074947">(Jun 14 2018 at 17:14)</a>:</h4>
<p>is it 5% worser for real?</p>



<a name="128074956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074956">(Jun 14 2018 at 17:14)</a>:</h4>
<p>interesting result</p>



<a name="128074961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074961">(Jun 14 2018 at 17:14)</a>:</h4>
<p>going to update the doc with the new date</p>



<a name="128074963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074963">(Jun 14 2018 at 17:14)</a>:</h4>
<p>I don't know? I don't really care :)</p>



<a name="128074965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074965">(Jun 14 2018 at 17:14)</a>:</h4>
<p>ok</p>



<a name="128074969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074969">(Jun 14 2018 at 17:14)</a>:</h4>
<p>I'm mostly interested in which parts of MIR borrowck</p>



<a name="128074970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074970">(Jun 14 2018 at 17:14)</a>:</h4>
<p>should I update the doc?</p>



<a name="128074975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074975">(Jun 14 2018 at 17:15)</a>:</h4>
<p>it is spending time in</p>



<a name="128074988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074988">(Jun 14 2018 at 17:15)</a>:</h4>
<p>I guess, I think it is not 5% worse</p>



<a name="128074992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128074992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128074992">(Jun 14 2018 at 17:15)</a>:</h4>
<p>based on perf</p>



<a name="128075003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128075003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128075003">(Jun 14 2018 at 17:15)</a>:</h4>
<p>yeah, I meant, I've already added june 6th results</p>



<a name="128075008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128075008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128075008">(Jun 14 2018 at 17:15)</a>:</h4>
<p>do you prefer today's ones?</p>



<a name="128075014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128075014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128075014">(Jun 14 2018 at 17:15)</a>:</h4>
<p>either is fine</p>



<a name="128075020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128075020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128075020">(Jun 14 2018 at 17:15)</a>:</h4>
<p>ok</p>



<a name="128075023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128075023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128075023">(Jun 14 2018 at 17:15)</a>:</h4>
<p>will leave as is then</p>



<a name="128075080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128075080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128075080">(Jun 14 2018 at 17:16)</a>:</h4>
<p>they suggest that <code>dropck_outlives</code> is the big thing</p>



<a name="128075082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128075082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128075082">(Jun 14 2018 at 17:16)</a>:</h4>
<p>which is interesting</p>



<a name="128075085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128075085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128075085">(Jun 14 2018 at 17:16)</a>:</h4>
<p>but consistent with prior profiles of syn that I did</p>



<a name="128075092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128075092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128075092">(Jun 14 2018 at 17:16)</a>:</h4>
<p>I am interested b/c i might've expected my branch to have more impact on that</p>



<a name="128087770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128087770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128087770">(Jun 14 2018 at 21:33)</a>:</h4>
<p>I'm not seeing <code>dropck_outlives</code> with callgrind on <code>syn</code>(0.57% total, 0.15% self)</p>



<a name="128087885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128087885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128087885">(Jun 14 2018 at 21:35)</a>:</h4>
<p>interesting</p>



<a name="128087939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128087939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128087939">(Jun 14 2018 at 21:36)</a>:</h4>
<p>and the "biggest" NLL item that shows up by itself (there's a big cycle that is hard to untangle and understand) is the liveness::generate but only 4.5% total, 2% self</p>



<a name="128087956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128087956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128087956">(Jun 14 2018 at 21:37)</a>:</h4>
<p>ok</p>



<a name="128088033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128088033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128088033">(Jun 14 2018 at 21:38)</a>:</h4>
<p>NLL doesn't seem to be a whole lot worse than clean on syn</p>



<a name="128088133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128088133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128088133">(Jun 14 2018 at 21:40)</a>:</h4>
<p>...huh.</p>



<a name="128088135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128088135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128088135">(Jun 14 2018 at 21:40)</a>:</h4>
<p>ok</p>



<a name="128088142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128088142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128088142">(Jun 14 2018 at 21:40)</a>:</h4>
<p>perf seems to think it's ~150%</p>



<a name="128088146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128088146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128088146">(Jun 14 2018 at 21:41)</a>:</h4>
<p>for check right ?</p>



<a name="128088181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128088181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128088181">(Jun 14 2018 at 21:41)</a>:</h4>
<p>on the compare page, for regular syn (non check) it's 13B to 16B, like 20%</p>



<a name="128088236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128088236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128088236">(Jun 14 2018 at 21:42)</a>:</h4>
<p>with NLL being lower than the baseline incr</p>



<a name="128088342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128088342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128088342">(Jun 14 2018 at 21:45)</a>:</h4>
<p>to be clear, I was looking at the regular non-check build, which is maybe not what niko and santiago were looking at (an maybe not that useful...)</p>



<a name="128088448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128088448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128088448">(Jun 14 2018 at 21:47)</a>:</h4>
<p>I'll get the numbers for the check profile :)</p>



<a name="128088456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128088456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128088456">(Jun 14 2018 at 21:47)</a>:</h4>
<blockquote>
<p>for check right ?</p>
</blockquote>
<p>yes, check</p>



<a name="128475100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128475100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128475100">(Jun 22 2018 at 14:20)</a>:</h4>
<p>my branch I think is roughly ready to land. It seems to be a solid win but not totally transformative :( In that branch, typeck for clap is down to 7% though, and I see some further possible gains. (In comparison to 22% before). Total MIR time goes from 49% to 39%</p>



<a name="128475104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128475104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128475104">(Jun 22 2018 at 14:21)</a>:</h4>
<p>I just wanted to get to 0% ;)</p>



<a name="128475114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128475114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128475114">(Jun 22 2018 at 14:21)</a>:</h4>
<p>(there is still some cleanup work to do after that on the branch, in particular I think that an earlier PR of mine broke the <code>futures</code> crate when used with NLL, but I may put off the fix until a follow-up PR)</p>



<a name="128475377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128475377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128475377">(Jun 22 2018 at 14:28)</a>:</h4>
<p>do we know if the MIR walks we're still doing are expensive ? and if we're maybe MIRwalking too much ?</p>



<a name="128477038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128477038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128477038">(Jun 22 2018 at 15:03)</a>:</h4>
<p>this is a graph of the time spent in MIR borrowck</p>



<a name="128477042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128477042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128477042">(Jun 22 2018 at 15:03)</a>:</h4>
<p><a href="https://gist.github.com/nikomatsakis/4f4d962f906bffcc6d142838b5ef9f19" target="_blank" title="https://gist.github.com/nikomatsakis/4f4d962f906bffcc6d142838b5ef9f19">https://gist.github.com/nikomatsakis/4f4d962f906bffcc6d142838b5ef9f19</a></p>



<a name="128477047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128477047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128477047">(Jun 22 2018 at 15:03)</a>:</h4>
<p>though it takes some time to learn how to interpret it</p>



<a name="128477050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128477050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128477050">(Jun 22 2018 at 15:03)</a>:</h4>
<p>each percentage is an <strong>absolute figure</strong> of total execution time</p>



<a name="128477053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128477053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128477053">(Jun 22 2018 at 15:03)</a>:</h4>
<p>and the labels on edges are the number of times that such an edge exists</p>



<a name="128477055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128477055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128477055">(Jun 22 2018 at 15:03)</a>:</h4>
<p>it is not complete, just the top N functions</p>



<a name="128477059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128477059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128477059">(Jun 22 2018 at 15:03)</a>:</h4>
<p>(this is the output of <code>--graph-callees</code> from perf-focus)</p>



<a name="128477064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128477064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128477064">(Jun 22 2018 at 15:03)</a>:</h4>
<p>you can see that e.g. <code>visit_statement_entry</code> is 8%</p>



<a name="128477106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128477106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128477106">(Jun 22 2018 at 15:04)</a>:</h4>
<p>a lot of which is <code>mutate_place</code> and <code>access_place</code></p>



<a name="128477144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128477144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128477144">(Jun 22 2018 at 15:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116113">@lqd</span> (I'm not sure if that includes your branch or not)</p>



<a name="128477199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128477199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128477199">(Jun 22 2018 at 15:06)</a>:</h4>
<p>nice graph :)</p>



<a name="128477460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128477460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128477460">(Jun 22 2018 at 15:12)</a>:</h4>
<p>the 2 _place functions look interesting indeed</p>



<a name="128477550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128477550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128477550">(Jun 22 2018 at 15:14)</a>:</h4>
<p>I was also wondering whether -Z two phase borrows had some speed implications (as IIRC perf.rlo only uses the MIR borrowck flag)</p>



<a name="128502989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc/near/128502989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/optimizing-old-skool-rustc.html#128502989">(Jun 23 2018 at 01:33)</a>:</h4>
<p>we should probably fix it; but I doubt it will have much impact</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>